C/C++ Causal Cycles Confound Compositionality

نویسندگان

  • Mike Dodds
  • Mark Batty
  • Alexey Gotsman
چکیده

The rise of multicore processors has made concurrency ubiquitous. In response, mainstream languages have begun to offer primitives for concurrent programming. To avoid the cost of inter-core synchronisation, the new C/C++ standard, C11 [2, 3], offers weakly consistent relaxed operations, alongside traditional reads, writes and mutexes. When using relaxed operations, different threads may see different, apparently contradictory orders of events. C11 permits a particularly suprising kind of relaxed behaviour: cycles in causality. Two conditional branches on different threads may be satisfied by writes down the opposite thread’s branch. That is, neither branch could be taken if the other didn’t occur – an apparent paradox. x = 0; y = 0; if (x == 42) || if (y == 23) y = 23; || x = 42; Such cycles could arise from hardware speculation or compiler optimisations; however, it is unclear whether they occur on current implementations. They are known to be problematic: the C11 standard heavily deprecates them, but to allow certain important optimisations, it falls short of banning them entirely. A property is compositional if each program sub-components can be analysed separately, while assuming its surrounding context is well-behaved. By allowing programs to be decomposed, compositionality aids documentation, testing and verification. In most languages, safety properties (e.g., absence of memory faults) are compositional, because a given fault must originate in the subcomponent or its context, but not both. Causal cycles in C11 allow two faults to cause each other, which violates this assumption and breaks compositionality [1]. This is probably undesirable. BODY C/C++ permit seemingly-impossible cycles in causality. This breaks compositionality: two apparently safe programs may fault when composed.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Vertex Removable Cycles of Graphs and Digraphs

‎In this paper we defined the vertex removable cycle in respect of the following‎, ‎if $F$ is a class of graphs(digraphs)‎ ‎satisfying certain property‎, ‎$G in F $‎, ‎the cycle $C$ in $G$ is called vertex removable if $G-V(C)in in F $.‎ ‎The vertex removable cycles of eulerian graphs are studied‎. ‎We also characterize the edge removable cycles of regular‎ ‎graphs(digraphs).‎    

متن کامل

0n removable cycles in graphs and digraphs

In this paper we define the removable cycle that, if $Im$ is a class of graphs, $Gin Im$, the cycle $C$ in $G$ is called removable if $G-E(C)in Im$. The removable cycles in Eulerian graphs have been studied. We characterize Eulerian graphs which contain two edge-disjoint removable cycles, and the necessary and sufficient conditions for Eulerian graph to have removable cycles h...

متن کامل

Colletotrichum gloeosporioides sensu stricto, the causal agent of a leaf spot disease of Schefflera arboricola in Iran

Schefflera arboricola is a flowering plant in the family Araliaceae; its common name is dwarf umbrella tree. It is an evergreen shrub and a popular ornamental plant, commonly grown as an indoor plant. During a sampling in 2015, a new leaf spot symptoms was observed on S. arboricola plants in several greenhouses in the Hamadan province, Iran. Most of the plants were se...

متن کامل

The conceptual centrality of causal cycles.

How do causal cycles affect judgments of conceptual centrality? Generally, a feature is central to a concept to the extent that other features in the concept depend on it, thereby rendering it immutable from the concept (Sloman, Love, & Ahn, 1998). Previous research on conceptual centrality has focused primarily on features involved in four major types of dependency structures: simple cause-eff...

متن کامل

On the No-Z-Cycle Property in Distributed Executions

Given a checkpoint and communication pattern of a distributed execution, the \No Z-Cycle" property (N ZC) states that there does not exist a dependency between a checkpoint and itself. In other words, there does not exist a non-causal sequence of messages that starts after a checkpoint and terminates before that checkpoint. From an operational point of view, this property corresponds to the fac...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • TinyToCS

دوره 2  شماره 

صفحات  -

تاریخ انتشار 2013